projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5a1dde6
)
(ignore-errors): Move here from cl-macs.el.
author
Glenn Morris
<rgm@gnu.org>
Wed, 7 May 2008 02:57:53 +0000
(
02:57
+0000)
committer
Glenn Morris
<rgm@gnu.org>
Wed, 7 May 2008 02:57:53 +0000
(
02:57
+0000)
lisp/subr.el
patch
|
blob
|
history
diff --git
a/lisp/subr.el
b/lisp/subr.el
index ae7c70d6781230e1ccbebcc5ad739d02bc9e7e0c..8264055651a593dc8b98e790c4187869322a67f9 100644
(file)
--- a/
lisp/subr.el
+++ b/
lisp/subr.el
@@
-202,6
+202,11
@@
the return value (nil if RESULT is omitted).
Treated as a declaration when used at the right place in a
`defmacro' form. \(See Info anchor `(elisp)Definition of declare'.)"
nil)
+
+(defmacro ignore-errors (&rest body)
+ "Execute BODY; if an error occurs, return nil.
+Otherwise, return result of last form in BODY."
+ `(condition-case nil (progn ,@body) (error nil)))
\f
;;;; Basic Lisp functions.